'''
Created on Sep 16, 2011

@author: peterd
'''

import networkx as nx

def main():
    oneXferNoWalkingG = nx.MultiDiGraph(ver='1.0', type='1_xfer_no_walking')
    oneXferNoWalkingG.add_node(1, id = 1)
    oneXferNoWalkingG.add_node(2, id = 2)
    oneXferNoWalkingG.add_node(3, id = 3)
    oneXferNoWalkingG.add_node(4, id = 4)
    oneXferNoWalkingG.add_node(5, id = 5)
    oneXferNoWalkingG.add_node(6, id = 6)
    oneXferNoWalkingG.add_node(7, id = 7)
    oneXferNoWalkingG.add_node(8, id = 8)
    oneXferNoWalkingG.add_node(9, id = 9)
    oneXferNoWalkingG.add_node(10, id = 10)
    oneXferNoWalkingG.add_node(11, id = 11)
    oneXferNoWalkingG.add_node(12, id = 12)
    oneXferNoWalkingG.add_node(13, id = 13)
    oneXferNoWalkingG.add_node(14, id = 14)
    oneXferNoWalkingG.add_node(15, id = 15)
    oneXferNoWalkingG.add_node(16, id = 16)
    oneXferNoWalkingG.add_edge(1, 2, type = 'd', weight = 1, key = '1')
    oneXferNoWalkingG.add_edge(2, 3, type = 'd', weight = 1, key = '1')
    oneXferNoWalkingG.add_edge(3, 4, type = 'd', weight = 1, key = '1')
    oneXferNoWalkingG.add_edge(5, 3, type = 'd', weight = 1, key = '2')
    oneXferNoWalkingG.add_edge(3, 6, type = 'd', weight = 1, key = '2')
    oneXferNoWalkingG.add_edge(6, 7, type = 'd', weight = 1, key = '2')
    oneXferNoWalkingG.add_edge(2, 8, type = 'd', weight = 1, key = '3')
    oneXferNoWalkingG.add_edge(8, 9, type = 'd', weight = 1, key = '3')
    oneXferNoWalkingG.add_edge(1, 10, type = 'd', weight = 1, key = '4')
    oneXferNoWalkingG.add_edge(10, 11, type = 'd', weight = 1, key = '4')
    oneXferNoWalkingG.add_edge(1, 12, type = 'd', weight = 1, key = '5')
    oneXferNoWalkingG.add_edge(12, 13, type = 'd', weight = 1, key = '5')
    oneXferNoWalkingG.add_edge(13, 14, type = 'd', weight = 1, key = '5')
    oneXferNoWalkingG.add_edge(14, 15, type = 'd', weight = 1, key = '5')
    oneXferNoWalkingG.add_edge(15, 3, type = 'd', weight = 1, key = '5')
    oneXferNoWalkingG.add_edge(3, 16, type = 'd', weight = 1, key = '5')
    nx.write_gpickle(oneXferNoWalkingG, 'mhdg_mini_onexfer_nowalking.pickle')


    twoXferNoWalkingG = nx.MultiDiGraph(ver='1.0', type='2_xfer_no_walking')
    twoXferNoWalkingG.add_node(1, id = 1)
    twoXferNoWalkingG.add_node(2, id = 2)
    twoXferNoWalkingG.add_node(3, id = 3)
    twoXferNoWalkingG.add_node(4, id = 4)
    twoXferNoWalkingG.add_node(5, id = 5)
    twoXferNoWalkingG.add_node(6, id = 6)
    twoXferNoWalkingG.add_node(7, id = 7)
    twoXferNoWalkingG.add_node(8, id = 8)
    twoXferNoWalkingG.add_node(9, id = 9)
    twoXferNoWalkingG.add_node(10, id = 10)
    twoXferNoWalkingG.add_node(11, id = 11)
    twoXferNoWalkingG.add_node(12, id = 12)
    twoXferNoWalkingG.add_node(13, id = 13)
    twoXferNoWalkingG.add_node(14, id = 14)
    twoXferNoWalkingG.add_node(15, id = 15)
    twoXferNoWalkingG.add_node(16, id = 16)
    twoXferNoWalkingG.add_node(17, id = 17)
    twoXferNoWalkingG.add_node(18, id = 18)
    twoXferNoWalkingG.add_node(19, id = 19)
    twoXferNoWalkingG.add_edge(1, 2, type = 'd', weight = 1, key = '1')
    twoXferNoWalkingG.add_edge(2, 3, type = 'd', weight = 1, key = '1')
    twoXferNoWalkingG.add_edge(3, 4, type = 'd', weight = 1, key = '1')
    twoXferNoWalkingG.add_edge(5, 3, type = 'd', weight = 1, key = '2')
    twoXferNoWalkingG.add_edge(3, 6, type = 'd', weight = 1, key = '2')
    twoXferNoWalkingG.add_edge(6, 7, type = 'd', weight = 1, key = '2')
    twoXferNoWalkingG.add_edge(2, 8, type = 'd', weight = 1, key = '3')
    twoXferNoWalkingG.add_edge(8, 9, type = 'd', weight = 1, key = '3')
    twoXferNoWalkingG.add_edge(1, 10, type = 'd', weight = 1, key = '4')
    twoXferNoWalkingG.add_edge(10, 11, type = 'd', weight = 1, key = '4')
    twoXferNoWalkingG.add_edge(1, 12, type = 'd', weight = 1, key = '5')
    twoXferNoWalkingG.add_edge(12, 13, type = 'd', weight = 1, key = '5')
    twoXferNoWalkingG.add_edge(13, 14, type = 'd', weight = 1, key = '5')
    twoXferNoWalkingG.add_edge(14, 15, type = 'd', weight = 1, key = '5')
    twoXferNoWalkingG.add_edge(15, 3, type = 'd', weight = 1, key = '5')
    twoXferNoWalkingG.add_edge(3, 16, type = 'd', weight = 1, key = '5')
    twoXferNoWalkingG.add_edge(17, 6, type = 'd', weight = 1, key = '7')
    twoXferNoWalkingG.add_edge(6, 18, type = 'd', weight = 1, key = '7')
    twoXferNoWalkingG.add_edge(18, 19, type = 'd', weight = 1, key = '7')
    nx.write_gpickle(twoXferNoWalkingG, 'mhdg_mini_twoxfer_nowalking.pickle')

    threeXferNoWalkingG = nx.MultiDiGraph(ver='1.0', type='2_xfer_no_walking')
    threeXferNoWalkingG.add_node(1, id = 1)
    threeXferNoWalkingG.add_node(2, id = 2)
    threeXferNoWalkingG.add_node(3, id = 3)
    threeXferNoWalkingG.add_node(4, id = 4)
    threeXferNoWalkingG.add_node(5, id = 5)
    threeXferNoWalkingG.add_node(6, id = 6)
    threeXferNoWalkingG.add_node(7, id = 7)
    threeXferNoWalkingG.add_node(8, id = 8)
    threeXferNoWalkingG.add_node(9, id = 9)
    threeXferNoWalkingG.add_node(10, id = 10)
    threeXferNoWalkingG.add_node(11, id = 11)
    threeXferNoWalkingG.add_node(12, id = 12)
    threeXferNoWalkingG.add_node(13, id = 13)
    threeXferNoWalkingG.add_node(14, id = 14)
    threeXferNoWalkingG.add_node(15, id = 15)
    threeXferNoWalkingG.add_node(16, id = 16)
    threeXferNoWalkingG.add_node(17, id = 17)
    threeXferNoWalkingG.add_node(18, id = 18)
    threeXferNoWalkingG.add_node(19, id = 19)
    threeXferNoWalkingG.add_node(20, id = 20)
    threeXferNoWalkingG.add_node(21, id = 21)
    threeXferNoWalkingG.add_node(22, id = 22)
    threeXferNoWalkingG.add_node(23, id = 23)
    threeXferNoWalkingG.add_node(24, id = 24)
    threeXferNoWalkingG.add_node(25, id = 25)
    threeXferNoWalkingG.add_edge(1, 2, type = 'd', weight = 1, key = '1')
    threeXferNoWalkingG.add_edge(2, 3, type = 'd', weight = 1, key = '1')
    threeXferNoWalkingG.add_edge(3, 4, type = 'd', weight = 1, key = '1')
    threeXferNoWalkingG.add_edge(5, 3, type = 'd', weight = 1, key = '2')
    threeXferNoWalkingG.add_edge(3, 6, type = 'd', weight = 1, key = '2')
    threeXferNoWalkingG.add_edge(6, 7, type = 'd', weight = 1, key = '2')
    threeXferNoWalkingG.add_edge(2, 8, type = 'd', weight = 1, key = '3')
    threeXferNoWalkingG.add_edge(8, 9, type = 'd', weight = 1, key = '3')
    threeXferNoWalkingG.add_edge(1, 10, type = 'd', weight = 1, key = '4')
    threeXferNoWalkingG.add_edge(10, 11, type = 'd', weight = 1, key = '4')
    threeXferNoWalkingG.add_edge(1, 12, type = 'd', weight = 1, key = '5')
    threeXferNoWalkingG.add_edge(12, 13, type = 'd', weight = 1, key = '5')
    threeXferNoWalkingG.add_edge(13, 14, type = 'd', weight = 1, key = '5')
    threeXferNoWalkingG.add_edge(14, 15, type = 'd', weight = 1, key = '5')
    threeXferNoWalkingG.add_edge(15, 3, type = 'd', weight = 1, key = '5')
    threeXferNoWalkingG.add_edge(3, 16, type = 'd', weight = 1, key = '5')
    threeXferNoWalkingG.add_edge(17, 6, type = 'd', weight = 1, key = '7')
    threeXferNoWalkingG.add_edge(6, 18, type = 'd', weight = 1, key = '7')
    threeXferNoWalkingG.add_edge(18, 19, type = 'd', weight = 1, key = '7')
    threeXferNoWalkingG.add_edge(20, 8, type = 'd', weight = 1, key = '8')
    threeXferNoWalkingG.add_edge(8, 22, type = 'd', weight = 1, key = '8')
    threeXferNoWalkingG.add_edge(22, 23, type = 'd', weight = 1, key = '8')
    threeXferNoWalkingG.add_edge(21, 22, type = 'd', weight = 1, key = '9')
    threeXferNoWalkingG.add_edge(22, 24, type = 'd', weight = 1, key = '9')
    threeXferNoWalkingG.add_edge(24, 25, type = 'd', weight = 1, key = '9')
    nx.write_gpickle(threeXferNoWalkingG, 'mhdg_mini_threexfer_nowalking.pickle')


    zeroXferWalkingG = nx.MultiDiGraph(ver='1.0', type='0_xfer_walking')
    zeroXferWalkingG.add_node(1, id = 1)
    zeroXferWalkingG.add_node(2, id = 2)
    zeroXferWalkingG.add_node(3, id = 3)
    zeroXferWalkingG.add_node(4, id = 4)
    zeroXferWalkingG.add_node(5, id = 5)
    zeroXferWalkingG.add_node(6, id = 6)
    zeroXferWalkingG.add_node(7, id = 7)
    zeroXferWalkingG.add_node(8, id = 8)
    zeroXferWalkingG.add_node(9, id = 9)
    zeroXferWalkingG.add_node(10, id = 10)
    zeroXferWalkingG.add_node(11, id = 11)
    zeroXferWalkingG.add_node(12, id = 12)
    zeroXferWalkingG.add_node(13, id = 13)
    zeroXferWalkingG.add_node(14, id = 14)
    zeroXferWalkingG.add_node(15, id = 15)
    zeroXferWalkingG.add_node(16, id = 16)
    zeroXferWalkingG.add_node(17, id = 17)
    zeroXferWalkingG.add_node(18, id = 18)
    zeroXferWalkingG.add_node(19, id = 19)
    zeroXferWalkingG.add_edge(1, 2, type = 'd', weight = 1, key = '1')
    zeroXferWalkingG.add_edge(2, 3, type = 'd', weight = 1, key = '1')
    zeroXferWalkingG.add_edge(3, 4, type = 'd', weight = 1, key = '1')
    zeroXferWalkingG.add_edge(5, 3, type = 'd', weight = 1, key = '2')
    zeroXferWalkingG.add_edge(3, 6, type = 'd', weight = 1, key = '2')
    zeroXferWalkingG.add_edge(6, 7, type = 'd', weight = 1, key = '2')
    zeroXferWalkingG.add_edge(2, 8, type = 'd', weight = 1, key = '3')
    zeroXferWalkingG.add_edge(8, 9, type = 'd', weight = 1, key = '3')
    zeroXferWalkingG.add_edge(1, 10, type = 'd', weight = 1, key = '4')
    zeroXferWalkingG.add_edge(10, 11, type = 'd', weight = 1, key = '4')
    zeroXferWalkingG.add_edge(1, 12, type = 'd', weight = 1, key = '5')
    zeroXferWalkingG.add_edge(12, 13, type = 'd', weight = 1, key = '5')
    zeroXferWalkingG.add_edge(13, 14, type = 'd', weight = 1, key = '5')
    zeroXferWalkingG.add_edge(14, 15, type = 'd', weight = 1, key = '5')
    zeroXferWalkingG.add_edge(15, 3, type = 'd', weight = 1, key = '5')
    zeroXferWalkingG.add_edge(3, 16, type = 'd', weight = 1, key = '5')
    zeroXferWalkingG.add_edge(11, 19, type = 'w', weight = 1, key = 0)
    zeroXferWalkingG.add_edge(17, 18, type = 'd', weight = 1, key = '7')
    zeroXferWalkingG.add_edge(18, 19, type = 'd', weight = 1, key = '7')
    nx.write_gpickle(zeroXferWalkingG, 'mhdg_mini_zeroxfer_walking.pickle')


    oneXferWalkingG = nx.MultiDiGraph(ver='1.0', type='1_xfer_walking')
    oneXferWalkingG.add_node(1, id = 1)
    oneXferWalkingG.add_node(2, id = 2)
    oneXferWalkingG.add_node(3, id = 3)
    oneXferWalkingG.add_node(4, id = 4)
    oneXferWalkingG.add_node(5, id = 5)
    oneXferWalkingG.add_node(6, id = 6)
    oneXferWalkingG.add_node(7, id = 7)
    oneXferWalkingG.add_node(8, id = 8)
    oneXferWalkingG.add_node(9, id = 9)
    oneXferWalkingG.add_node(10, id = 10)
    oneXferWalkingG.add_node(11, id = 11)
    oneXferWalkingG.add_node(12, id = 12)
    oneXferWalkingG.add_node(13, id = 13)
    oneXferWalkingG.add_node(14, id = 14)
    oneXferWalkingG.add_node(15, id = 15)
    oneXferWalkingG.add_node(16, id = 16)
    oneXferWalkingG.add_node(17, id = 17)
    oneXferWalkingG.add_node(18, id = 18)
    oneXferWalkingG.add_node(19, id = 19)
    oneXferWalkingG.add_node(20, id = 20)
    oneXferWalkingG.add_node(21, id = 21)
    oneXferWalkingG.add_node(22, id = 22)
    oneXferWalkingG.add_edge(1, 2, type = 'd', weight = 1, key = '1')
    oneXferWalkingG.add_edge(2, 3, type = 'd', weight = 1, key = '1')
    oneXferWalkingG.add_edge(3, 4, type = 'd', weight = 1, key = '1')
    oneXferWalkingG.add_edge(5, 3, type = 'd', weight = 1, key = '2')
    oneXferWalkingG.add_edge(3, 6, type = 'd', weight = 1, key = '2')
    oneXferWalkingG.add_edge(6, 7, type = 'd', weight = 1, key = '2')
    oneXferWalkingG.add_edge(2, 8, type = 'd', weight = 1, key = '3')
    oneXferWalkingG.add_edge(8, 9, type = 'd', weight = 1, key = '3')
    oneXferWalkingG.add_edge(1, 10, type = 'd', weight = 1, key = '4')
    oneXferWalkingG.add_edge(10, 11, type = 'd', weight = 1, key = '4')
    oneXferWalkingG.add_edge(1, 12, type = 'd', weight = 1, key = '5')
    oneXferWalkingG.add_edge(12, 13, type = 'd', weight = 1, key = '5')
    oneXferWalkingG.add_edge(13, 14, type = 'd', weight = 1, key = '5')
    oneXferWalkingG.add_edge(14, 15, type = 'd', weight = 1, key = '5')
    oneXferWalkingG.add_edge(15, 3, type = 'd', weight = 1, key = '5')
    oneXferWalkingG.add_edge(3, 16, type = 'd', weight = 1, key = '5')
    oneXferWalkingG.add_edge(11, 19, type = 'w', weight = 1, key = 0)
    oneXferWalkingG.add_edge(19, 11, type = 'w', weight = 1, key = 0)
    oneXferWalkingG.add_edge(19, 18, type = 'd', weight = 1, key = '7')
    oneXferWalkingG.add_edge(18, 17, type = 'd', weight = 1, key = '7')
    oneXferWalkingG.add_edge(2, 20, type = 'w', weight = 1, key = 0)
    oneXferWalkingG.add_edge(20, 2, type = 'w', weight = 1, key = 0)
    oneXferWalkingG.add_edge(20, 21, type = 'd', weight = 1, key = '9')
    oneXferWalkingG.add_edge(21, 22, type = 'd', weight = 1, key = '9')
    nx.write_gpickle(oneXferWalkingG, 'mhdg_mini_onexfer_walking.pickle')

    twoXferWalkingG = nx.MultiDiGraph(ver='1.0', type='2_xfer_walking')
    twoXferWalkingG.add_node(1, id = 1)
    twoXferWalkingG.add_node(2, id = 2)
    twoXferWalkingG.add_node(3, id = 3)
    twoXferWalkingG.add_node(4, id = 4)
    twoXferWalkingG.add_node(5, id = 5)
    twoXferWalkingG.add_node(6, id = 6)
    twoXferWalkingG.add_node(7, id = 7)
    twoXferWalkingG.add_node(8, id = 8)
    twoXferWalkingG.add_node(9, id = 9)
    twoXferWalkingG.add_node(10, id = 10)
    twoXferWalkingG.add_node(11, id = 11)
    twoXferWalkingG.add_node(12, id = 12)
    twoXferWalkingG.add_node(13, id = 13)
    twoXferWalkingG.add_node(14, id = 14)
    twoXferWalkingG.add_node(15, id = 15)
    twoXferWalkingG.add_node(16, id = 16)
    twoXferWalkingG.add_node(17, id = 17)
    twoXferWalkingG.add_node(18, id = 18)
    twoXferWalkingG.add_node(19, id = 19)
    twoXferWalkingG.add_node(20, id = 20)
    twoXferWalkingG.add_node(21, id = 21)
    twoXferWalkingG.add_node(22, id = 22)
    twoXferWalkingG.add_node(23, id = 23)
    twoXferWalkingG.add_node(24, id = 24)
    twoXferWalkingG.add_node(25, id = 25)
    twoXferWalkingG.add_node(26, id = 26)
    twoXferWalkingG.add_edge(1, 2, type = 'd', weight = 1, key = '1')
    twoXferWalkingG.add_edge(2, 3, type = 'd', weight = 1, key = '1')
    twoXferWalkingG.add_edge(3, 4, type = 'd', weight = 1, key = '1')
    twoXferWalkingG.add_edge(5, 3, type = 'd', weight = 1, key = '2')
    twoXferWalkingG.add_edge(3, 6, type = 'd', weight = 1, key = '2')
    twoXferWalkingG.add_edge(6, 7, type = 'd', weight = 1, key = '2')
    twoXferWalkingG.add_edge(2, 8, type = 'd', weight = 1, key = '3')
    twoXferWalkingG.add_edge(8, 9, type = 'd', weight = 1, key = '3')
    twoXferWalkingG.add_edge(1, 10, type = 'd', weight = 1, key = '4')
    twoXferWalkingG.add_edge(10, 11, type = 'd', weight = 1, key = '4')
    twoXferWalkingG.add_edge(1, 12, type = 'd', weight = 1, key = '5')
    twoXferWalkingG.add_edge(12, 13, type = 'd', weight = 1, key = '5')
    twoXferWalkingG.add_edge(13, 14, type = 'd', weight = 1, key = '5')
    twoXferWalkingG.add_edge(14, 15, type = 'd', weight = 1, key = '5')
    twoXferWalkingG.add_edge(15, 3, type = 'd', weight = 1, key = '5')
    twoXferWalkingG.add_edge(3, 16, type = 'd', weight = 1, key = '5')
    twoXferWalkingG.add_edge(11, 19, type = 'w', weight = 1, key = 0)
    twoXferWalkingG.add_edge(19, 11, type = 'w', weight = 1, key = 0)
    twoXferWalkingG.add_edge(19, 18, type = 'd', weight = 1, key = '7')
    twoXferWalkingG.add_edge(18, 17, type = 'd', weight = 1, key = '7')
    twoXferWalkingG.add_edge(2, 20, type = 'w', weight = 1, key = 0)
    twoXferWalkingG.add_edge(20, 2, type = 'w', weight = 1, key = 0)
    twoXferWalkingG.add_edge(20, 21, type = 'd', weight = 1, key = '9')
    twoXferWalkingG.add_edge(21, 22, type = 'd', weight = 1, key = '9')
    twoXferWalkingG.add_edge(23, 21, type = 'd', weight = 1, key = '11')
    twoXferWalkingG.add_edge(21, 24, type = 'd', weight = 1, key = '11')
    twoXferWalkingG.add_edge(24, 25, type = 'd', weight = 1, key = '11')
    twoXferWalkingG.add_edge(25, 26, type = 'd', weight = 1, key = '11')
    nx.write_gpickle(twoXferWalkingG, 'mhdg_mini_twoxfer_walking.pickle')


    twoXferTwoWalkingG = nx.MultiDiGraph(ver='1.0', type='2_xfer_2walking')
    twoXferTwoWalkingG.add_node(1, id = 1)
    twoXferTwoWalkingG.add_node(2, id = 2)
    twoXferTwoWalkingG.add_node(3, id = 3)
    twoXferTwoWalkingG.add_node(4, id = 4)
    twoXferTwoWalkingG.add_node(5, id = 5)
    twoXferTwoWalkingG.add_node(6, id = 6)
    twoXferTwoWalkingG.add_node(7, id = 7)
    twoXferTwoWalkingG.add_node(8, id = 8)
    twoXferTwoWalkingG.add_node(9, id = 9)
    twoXferTwoWalkingG.add_node(10, id = 10)
    twoXferTwoWalkingG.add_node(11, id = 11)
    twoXferTwoWalkingG.add_node(12, id = 12)
    twoXferTwoWalkingG.add_node(13, id = 13)
    twoXferTwoWalkingG.add_node(14, id = 14)
    twoXferTwoWalkingG.add_node(15, id = 15)
    twoXferTwoWalkingG.add_node(16, id = 16)
    twoXferTwoWalkingG.add_node(17, id = 17)
    twoXferTwoWalkingG.add_node(18, id = 18)
    twoXferTwoWalkingG.add_node(19, id = 19)
    twoXferTwoWalkingG.add_node(20, id = 20)
    twoXferTwoWalkingG.add_node(21, id = 21)
    twoXferTwoWalkingG.add_node(22, id = 22)
    twoXferTwoWalkingG.add_node(23, id = 23)
    twoXferTwoWalkingG.add_node(24, id = 24)
    twoXferTwoWalkingG.add_node(25, id = 25)
    twoXferTwoWalkingG.add_node(26, id = 26)
    twoXferTwoWalkingG.add_edge(1, 2, type = 'd', weight = 1, key = '1')
    twoXferTwoWalkingG.add_edge(2, 3, type = 'd', weight = 1, key = '1')
    twoXferTwoWalkingG.add_edge(3, 4, type = 'd', weight = 1, key = '1')
    twoXferTwoWalkingG.add_edge(5, 3, type = 'd', weight = 1, key = '2')
    twoXferTwoWalkingG.add_edge(3, 6, type = 'd', weight = 1, key = '2')
    twoXferTwoWalkingG.add_edge(6, 7, type = 'd', weight = 1, key = '2')
    twoXferTwoWalkingG.add_edge(2, 8, type = 'd', weight = 1, key = '3')
    twoXferTwoWalkingG.add_edge(8, 9, type = 'd', weight = 1, key = '3')
    twoXferTwoWalkingG.add_edge(1, 10, type = 'd', weight = 1, key = '4')
    twoXferTwoWalkingG.add_edge(10, 11, type = 'd', weight = 1, key = '4')
    twoXferTwoWalkingG.add_edge(1, 12, type = 'd', weight = 1, key = '5')
    twoXferTwoWalkingG.add_edge(12, 13, type = 'd', weight = 1, key = '5')
    twoXferTwoWalkingG.add_edge(13, 14, type = 'd', weight = 1, key = '5')
    twoXferTwoWalkingG.add_edge(14, 15, type = 'd', weight = 1, key = '5')
    twoXferTwoWalkingG.add_edge(15, 3, type = 'd', weight = 1, key = '5')
    twoXferTwoWalkingG.add_edge(3, 16, type = 'd', weight = 1, key = '5')
    twoXferTwoWalkingG.add_edge(11, 19, type = 'w', weight = 1, key = 0)
    twoXferTwoWalkingG.add_edge(19, 11, type = 'w', weight = 1, key = 0)
    twoXferTwoWalkingG.add_edge(19, 18, type = 'd', weight = 1, key = '7')
    twoXferTwoWalkingG.add_edge(18, 17, type = 'd', weight = 1, key = '7')
    twoXferTwoWalkingG.add_edge(17, 2, type = 'd', weight = 1, key = '7')
    twoXferTwoWalkingG.add_edge(2, 20, type = 'w', weight = 1, key = 0)
    twoXferTwoWalkingG.add_edge(20, 2, type = 'w', weight = 1, key = 0)
    twoXferTwoWalkingG.add_edge(20, 21, type = 'd', weight = 1, key = '9')
    twoXferTwoWalkingG.add_edge(21, 22, type = 'd', weight = 1, key = '9')
    twoXferTwoWalkingG.add_edge(23, 21, type = 'd', weight = 1, key = '11')
    twoXferTwoWalkingG.add_edge(21, 24, type = 'd', weight = 1, key = '11')
    twoXferTwoWalkingG.add_edge(24, 25, type = 'd', weight = 1, key = '11')
    twoXferTwoWalkingG.add_edge(25, 26, type = 'd', weight = 1, key = '11')
    nx.write_gpickle(twoXferTwoWalkingG, 'mhdg_mini_twoxfer_twowalking.pickle')

    threeXferWalkingG = nx.MultiDiGraph(ver='1.0', type='3_xfer_walking')
    threeXferWalkingG.add_node(1, id = 1)
    threeXferWalkingG.add_node(2, id = 2)
    threeXferWalkingG.add_node(3, id = 3)
    threeXferWalkingG.add_node(4, id = 4)
    threeXferWalkingG.add_node(5, id = 5)
    threeXferWalkingG.add_node(6, id = 6)
    threeXferWalkingG.add_node(7, id = 7)
    threeXferWalkingG.add_node(8, id = 8)
    threeXferWalkingG.add_node(9, id = 9)
    threeXferWalkingG.add_node(10, id = 10)
    threeXferWalkingG.add_node(11, id = 11)
    threeXferWalkingG.add_node(12, id = 12)
    threeXferWalkingG.add_node(13, id = 13)
    threeXferWalkingG.add_node(14, id = 14)
    threeXferWalkingG.add_node(15, id = 15)
    threeXferWalkingG.add_node(16, id = 16)
    threeXferWalkingG.add_node(17, id = 17)
    threeXferWalkingG.add_node(18, id = 18)
    threeXferWalkingG.add_node(19, id = 19)
    threeXferWalkingG.add_node(20, id = 20)
    threeXferWalkingG.add_node(21, id = 21)
    threeXferWalkingG.add_node(22, id = 22)
    threeXferWalkingG.add_node(23, id = 23)
    threeXferWalkingG.add_node(24, id = 24)
    threeXferWalkingG.add_node(25, id = 25)
    threeXferWalkingG.add_node(26, id = 26)
    threeXferWalkingG.add_node(27, id = 27)
    threeXferWalkingG.add_node(28, id = 28)
    threeXferWalkingG.add_node(29, id = 29)
    threeXferWalkingG.add_edge(1, 2, type = 'd', weight = 1, key = '1')
    threeXferWalkingG.add_edge(2, 3, type = 'd', weight = 1, key = '1')
    threeXferWalkingG.add_edge(3, 4, type = 'd', weight = 1, key = '1')
    threeXferWalkingG.add_edge(5, 3, type = 'd', weight = 1, key = '2')
    threeXferWalkingG.add_edge(3, 6, type = 'd', weight = 1, key = '2')
    threeXferWalkingG.add_edge(6, 7, type = 'd', weight = 1, key = '2')
    threeXferWalkingG.add_edge(2, 8, type = 'd', weight = 1, key = '3')
    threeXferWalkingG.add_edge(8, 9, type = 'd', weight = 1, key = '3')
    threeXferWalkingG.add_edge(1, 10, type = 'd', weight = 1, key = '4')
    threeXferWalkingG.add_edge(10, 11, type = 'd', weight = 1, key = '4')
    threeXferWalkingG.add_edge(1, 12, type = 'd', weight = 1, key = '5')
    threeXferWalkingG.add_edge(12, 13, type = 'd', weight = 1, key = '5')
    threeXferWalkingG.add_edge(13, 14, type = 'd', weight = 1, key = '5')
    threeXferWalkingG.add_edge(14, 15, type = 'd', weight = 1, key = '5')
    threeXferWalkingG.add_edge(15, 3, type = 'd', weight = 1, key = '5')
    threeXferWalkingG.add_edge(3, 16, type = 'd', weight = 1, key = '5')
    threeXferWalkingG.add_edge(11, 19, type = 'w', weight = 1, key = 0)
    threeXferWalkingG.add_edge(19, 11, type = 'w', weight = 1, key = 0)
    threeXferWalkingG.add_edge(19, 18, type = 'd', weight = 1, key = '7')
    threeXferWalkingG.add_edge(18, 17, type = 'd', weight = 1, key = '7')
    threeXferWalkingG.add_edge(17, 2, type = 'd', weight = 1, key = '7')
    threeXferWalkingG.add_edge(2, 20, type = 'w', weight = 1, key = 0)
    threeXferWalkingG.add_edge(20, 2, type = 'w', weight = 1, key = 0)
    threeXferWalkingG.add_edge(20, 21, type = 'd', weight = 1, key = '9')
    threeXferWalkingG.add_edge(21, 22, type = 'd', weight = 1, key = '9')
    threeXferWalkingG.add_edge(23, 21, type = 'd', weight = 1, key = '11')
    threeXferWalkingG.add_edge(21, 24, type = 'd', weight = 1, key = '11')
    threeXferWalkingG.add_edge(24, 25, type = 'd', weight = 1, key = '11')
    threeXferWalkingG.add_edge(25, 26, type = 'd', weight = 1, key = '11')
    threeXferWalkingG.add_edge(27, 8, type = 'd', weight = 1, key = '12')
    threeXferWalkingG.add_edge(8, 28, type = 'd', weight = 1, key = '12')
    threeXferWalkingG.add_edge(28, 29, type = 'd', weight = 1, key = '12')
    nx.write_gpickle(threeXferWalkingG, 'mhdg_mini_threexfer_walking.pickle')

    threeXferTwoWalkingG = nx.MultiDiGraph(ver='1.0', type='3_xfer_2walking')
    threeXferTwoWalkingG.add_node(1, id = 1)
    threeXferTwoWalkingG.add_node(2, id = 2)
    threeXferTwoWalkingG.add_node(3, id = 3)
    threeXferTwoWalkingG.add_node(4, id = 4)
    threeXferTwoWalkingG.add_node(5, id = 5)
    threeXferTwoWalkingG.add_node(6, id = 6)
    threeXferTwoWalkingG.add_node(7, id = 7)
    threeXferTwoWalkingG.add_node(8, id = 8)
    threeXferTwoWalkingG.add_node(9, id = 9)
    threeXferTwoWalkingG.add_node(10, id = 10)
    threeXferTwoWalkingG.add_node(11, id = 11)
    threeXferTwoWalkingG.add_node(12, id = 12)
    threeXferTwoWalkingG.add_node(13, id = 13)
    threeXferTwoWalkingG.add_node(14, id = 14)
    threeXferTwoWalkingG.add_node(15, id = 15)
    threeXferTwoWalkingG.add_node(16, id = 16)
    threeXferTwoWalkingG.add_node(17, id = 17)
    threeXferTwoWalkingG.add_node(18, id = 18)
    threeXferTwoWalkingG.add_node(19, id = 19)
    threeXferTwoWalkingG.add_node(20, id = 20)
    threeXferTwoWalkingG.add_node(21, id = 21)
    threeXferTwoWalkingG.add_node(22, id = 22)
    threeXferTwoWalkingG.add_node(23, id = 23)
    threeXferTwoWalkingG.add_node(24, id = 24)
    threeXferTwoWalkingG.add_node(25, id = 25)
    threeXferTwoWalkingG.add_node(26, id = 26)
    threeXferTwoWalkingG.add_node(27, id = 27)
    threeXferTwoWalkingG.add_node(28, id = 28)
    threeXferTwoWalkingG.add_node(29, id = 29)
    threeXferTwoWalkingG.add_node(30, id = 30)
    threeXferTwoWalkingG.add_edge(1, 2, type = 'd', weight = 1, key = '1')
    threeXferTwoWalkingG.add_edge(2, 3, type = 'd', weight = 1, key = '1')
    threeXferTwoWalkingG.add_edge(3, 4, type = 'd', weight = 1, key = '1')
    threeXferTwoWalkingG.add_edge(5, 3, type = 'd', weight = 1, key = '2')
    threeXferTwoWalkingG.add_edge(3, 6, type = 'd', weight = 1, key = '2')
    threeXferTwoWalkingG.add_edge(6, 7, type = 'd', weight = 1, key = '2')
    threeXferTwoWalkingG.add_edge(2, 8, type = 'd', weight = 1, key = '3')
    threeXferTwoWalkingG.add_edge(8, 9, type = 'd', weight = 1, key = '3')
    threeXferTwoWalkingG.add_edge(1, 10, type = 'd', weight = 1, key = '4')
    threeXferTwoWalkingG.add_edge(10, 11, type = 'd', weight = 1, key = '4')
    threeXferTwoWalkingG.add_edge(1, 12, type = 'd', weight = 1, key = '5')
    threeXferTwoWalkingG.add_edge(12, 13, type = 'd', weight = 1, key = '5')
    threeXferTwoWalkingG.add_edge(13, 14, type = 'd', weight = 1, key = '5')
    threeXferTwoWalkingG.add_edge(14, 15, type = 'd', weight = 1, key = '5')
    threeXferTwoWalkingG.add_edge(15, 3, type = 'd', weight = 1, key = '5')
    threeXferTwoWalkingG.add_edge(3, 16, type = 'd', weight = 1, key = '5')
    threeXferTwoWalkingG.add_edge(11, 19, type = 'w', weight = 1, key = 0)
    threeXferTwoWalkingG.add_edge(19, 11, type = 'w', weight = 1, key = 0)
    threeXferTwoWalkingG.add_edge(19, 18, type = 'd', weight = 1, key = '7')
    threeXferTwoWalkingG.add_edge(18, 17, type = 'd', weight = 1, key = '7')
    threeXferTwoWalkingG.add_edge(17, 2, type = 'd', weight = 1, key = '7')
    threeXferTwoWalkingG.add_edge(2, 20, type = 'w', weight = 1, key = 0)
    threeXferTwoWalkingG.add_edge(20, 2, type = 'w', weight = 1, key = 0)
    threeXferTwoWalkingG.add_edge(20, 21, type = 'd', weight = 1, key = '9')
    threeXferTwoWalkingG.add_edge(21, 22, type = 'd', weight = 1, key = '9')
    threeXferTwoWalkingG.add_edge(23, 21, type = 'd', weight = 1, key = '11')
    threeXferTwoWalkingG.add_edge(21, 24, type = 'd', weight = 1, key = '11')
    threeXferTwoWalkingG.add_edge(24, 25, type = 'd', weight = 1, key = '11')
    threeXferTwoWalkingG.add_edge(25, 26, type = 'd', weight = 1, key = '11')
    threeXferTwoWalkingG.add_edge(27, 8, type = 'd', weight = 1, key = '12')
    threeXferTwoWalkingG.add_edge(8, 28, type = 'd', weight = 1, key = '12')
    threeXferTwoWalkingG.add_edge(28, 29, type = 'd', weight = 1, key = '12')
    threeXferTwoWalkingG.add_edge(29, 30, type = 'w', weight = 1, key = 0)
    threeXferTwoWalkingG.add_edge(30, 29, type = 'w', weight = 1, key = 0)
    nx.write_gpickle(threeXferTwoWalkingG, 'mhdg_mini_threexfer_twowalking.pickle')

    threeXferThreeWalkingG = nx.MultiDiGraph(ver='1.0', type='3_xfer_3walking')
    threeXferThreeWalkingG.add_node(1, id = 1)
    threeXferThreeWalkingG.add_node(2, id = 2)
    threeXferThreeWalkingG.add_node(3, id = 3)
    threeXferThreeWalkingG.add_node(4, id = 4)
    threeXferThreeWalkingG.add_node(5, id = 5)
    threeXferThreeWalkingG.add_node(6, id = 6)
    threeXferThreeWalkingG.add_node(7, id = 7)
    threeXferThreeWalkingG.add_node(8, id = 8)
    threeXferThreeWalkingG.add_node(9, id = 9)
    threeXferThreeWalkingG.add_node(10, id = 10)
    threeXferThreeWalkingG.add_node(11, id = 11)
    threeXferThreeWalkingG.add_node(12, id = 12)
    threeXferThreeWalkingG.add_node(13, id = 13)
    threeXferThreeWalkingG.add_node(14, id = 14)
    threeXferThreeWalkingG.add_node(15, id = 15)
    threeXferThreeWalkingG.add_node(16, id = 16)
    threeXferThreeWalkingG.add_node(17, id = 17)
    threeXferThreeWalkingG.add_node(18, id = 18)
    threeXferThreeWalkingG.add_node(19, id = 19)
    threeXferThreeWalkingG.add_node(20, id = 20)
    threeXferThreeWalkingG.add_node(21, id = 21)
    threeXferThreeWalkingG.add_node(22, id = 22)
    threeXferThreeWalkingG.add_node(23, id = 23)
    threeXferThreeWalkingG.add_node(24, id = 24)
    threeXferThreeWalkingG.add_node(25, id = 25)
    threeXferThreeWalkingG.add_node(26, id = 26)
    threeXferThreeWalkingG.add_node(27, id = 27)
    threeXferThreeWalkingG.add_node(28, id = 28)
    threeXferThreeWalkingG.add_node(29, id = 29)
    threeXferThreeWalkingG.add_node(30, id = 30)
    threeXferThreeWalkingG.add_node(31, id = 31)
    threeXferThreeWalkingG.add_node(32, id = 32)
    threeXferThreeWalkingG.add_node(33, id = 33)
    threeXferThreeWalkingG.add_edge(1, 2, type = 'd', weight = 1, key = '1')
    threeXferThreeWalkingG.add_edge(2, 3, type = 'd', weight = 1, key = '1')
    threeXferThreeWalkingG.add_edge(3, 4, type = 'd', weight = 1, key = '1')
    threeXferThreeWalkingG.add_edge(5, 3, type = 'd', weight = 1, key = '2')
    threeXferThreeWalkingG.add_edge(3, 6, type = 'd', weight = 1, key = '2')
    threeXferThreeWalkingG.add_edge(6, 7, type = 'd', weight = 1, key = '2')
    threeXferThreeWalkingG.add_edge(2, 8, type = 'd', weight = 1, key = '3')
    threeXferThreeWalkingG.add_edge(8, 9, type = 'd', weight = 1, key = '3')
    threeXferThreeWalkingG.add_edge(1, 10, type = 'd', weight = 1, key = '4')
    threeXferThreeWalkingG.add_edge(10, 11, type = 'd', weight = 1, key = '4')
    threeXferThreeWalkingG.add_edge(1, 12, type = 'd', weight = 1, key = '5')
    threeXferThreeWalkingG.add_edge(12, 13, type = 'd', weight = 1, key = '5')
    threeXferThreeWalkingG.add_edge(13, 14, type = 'd', weight = 1, key = '5')
    threeXferThreeWalkingG.add_edge(14, 15, type = 'd', weight = 1, key = '5')
    threeXferThreeWalkingG.add_edge(15, 3, type = 'd', weight = 1, key = '5')
    threeXferThreeWalkingG.add_edge(3, 16, type = 'd', weight = 1, key = '5')
    threeXferThreeWalkingG.add_edge(11, 19, type = 'w', weight = 1, key = 0)
    threeXferThreeWalkingG.add_edge(19, 11, type = 'w', weight = 1, key = 0)
    threeXferThreeWalkingG.add_edge(19, 18, type = 'd', weight = 1, key = '7')
    threeXferThreeWalkingG.add_edge(18, 17, type = 'd', weight = 1, key = '7')
    threeXferThreeWalkingG.add_edge(17, 2, type = 'd', weight = 1, key = '7')
    threeXferThreeWalkingG.add_edge(2, 20, type = 'w', weight = 1, key = 0)
    threeXferThreeWalkingG.add_edge(20, 2, type = 'w', weight = 1, key = 0)
    threeXferThreeWalkingG.add_edge(20, 21, type = 'd', weight = 1, key = '9')
    threeXferThreeWalkingG.add_edge(21, 22, type = 'd', weight = 1, key = '9')
    threeXferThreeWalkingG.add_edge(23, 21, type = 'd', weight = 1, key = '11')
    threeXferThreeWalkingG.add_edge(21, 24, type = 'd', weight = 1, key = '11')
    threeXferThreeWalkingG.add_edge(24, 25, type = 'd', weight = 1, key = '11')
    threeXferThreeWalkingG.add_edge(25, 26, type = 'd', weight = 1, key = '11')
    threeXferThreeWalkingG.add_edge(27, 8, type = 'd', weight = 1, key = '12')
    threeXferThreeWalkingG.add_edge(8, 28, type = 'd', weight = 1, key = '12')
    threeXferThreeWalkingG.add_edge(28, 29, type = 'd', weight = 1, key = '12')
    threeXferThreeWalkingG.add_edge(29, 30, type = 'w', weight = 1, key = 0)
    threeXferThreeWalkingG.add_edge(30, 29, type = 'w', weight = 1, key = 0)
    threeXferThreeWalkingG.add_edge(22, 7, type = 'w', weight = 1, key = 0)
    threeXferThreeWalkingG.add_edge(7, 22, type = 'w', weight = 1, key = 0)
    threeXferThreeWalkingG.add_edge(7, 31, type = 'd', weight = 1, key = '2')
    threeXferThreeWalkingG.add_edge(1, 32, type = 'w', weight = 1, key = 0)
    threeXferThreeWalkingG.add_edge(32, 1, type = 'w', weight = 1, key = 0)
    threeXferThreeWalkingG.add_edge(2, 32, type = 'd', weight = 1, key = '21')
    threeXferThreeWalkingG.add_edge(32, 33, type = 'd', weight = 1, key = '21')    
    nx.write_gpickle(threeXferThreeWalkingG, 'mhdg_mini_threexfer_threewalking.pickle')


if __name__ == '__main__':
    main()
